import { routerAccessData } from "../router/index";
import { Location } from "react-router-dom";
import { getAccess } from "../router/access";
export const aceessControll = (location: Location) => {
  const accessName = routerAccessData[location.pathname];
  if (!accessName) return true;
  if (accessName && getAccess().includes(accessName)) {
    return true;
  } else {
    return false;
  }
};
